package com.woniuxy.mapper;

import com.woniuxy.service.CommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class CommandLineRunner {
    @Autowired
    private CommunityService communityService;
    //@Scheduled(cron = "0 0 0 * * *") // 每天0点执行一次
    @Scheduled(cron = "0 0/1 * * * *") // 每分钟执行一次
    public void updateCommunity() {

        communityService.updateCommunity();
    }
}
